package com.lzh.o2o.enums;
/** 
* @author  haohao: 
* @date 创建时间：2018年9月13日 下午7:36:13 
* @version 1.0 
* @parameter 
* @since  
* @return  商品状态信息
*/

public enum ProductCategoryStateEnum {
	OFFLINE(-1,"非法商品"),SUCCESS(0,"操作成功"),PASS(2,"通过认证"),
	INNER_ERROR(-1001,"操作失败"),EMPTY_LIST(-1002,"商品为空");
	private int state;
	private String stateInfo;
	
	private ProductCategoryStateEnum(int state, String stateInfo) {
		this.state = state;
		this.stateInfo = stateInfo;
	}
	public int getState() {
		return state;
	}
	public String getStateInfo() {
		return stateInfo;
	}
	public static ProductCategoryStateEnum stateOf(int index){
		for(ProductCategoryStateEnum state:values()){
			if(state.getState()==index){
				return state;
			}	
		}
		return null;
		
	}

}
